<{include file="admin:common/header.html"}>

<div class="page-title">
	<table width="100%" align="center" cellpadding="0" cellspacing="0" >
		<tr>
			<td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
			<th><{$MOD.title}></th>
			<td align="right"><{link ctl="activity/main:so"  load="mini:搜索活动" class="button" title="搜索"}> &nbsp; &nbsp;<{link ctl="activity/main:create" class="button" title="添加"}></td>
			<td width="15"></td>
		</tr>
	</table>
</div>


<div class="page-data">	
    <style type="text/css">
	.tip-notice label em{color:#3300cc;}
</style>
<h4 class="tip-notice" style="margin-bottom:10px;">说明：活动可以删除但是因为报名列表需要显示对应的活动所以我们采取了软删除！删除后前台不显示后台记录只会标示已经删除</h4>
<div class="tabs" style="margin-top:5px;">
    <a <{if isset($pager.closed) && $pager.closed ===0}>class="on"<{/if}> href="?activity/main-index.html&closed=0"><em>正常活动</em></a>
    <a <{if isset($pager.closed) && $pager.closed === 1}>class="on"<{/if}> href="?activity/main-index.html&closed=1"><em>已下架活动</em></a>
</div>
	<form id="items-form">
    <table width="100%" border="0" cellspacing="0" class="table-data table">
        <tr><th>ID</th><th>标题</th><th>选择分类</th><th>所在城市</th><th>所在地区</th><th>报名截止日期</th><th>活动开始日期</th><th>活动结束日期</th><th>报名人数</th><th>活动联系电话</th><th>活动地址</th><th>指定静态模板地址</th><th>是否删除</th><th class="w-150">操作</th></tr>
    <{foreach $items as $item}>
    <tr>
        <td><{$item.id}></td>
        <td><{$item.title}></td><td><{$cateList[$item.cate_id].title}></td><td><{$cityList[$item.city_id].city_name}></td><td><{$areaList[$item.area_id].area_name}></td><td><{$item.reg_time}></td><td><{$item.bg_time}></td><td><{$item.end_time}></td><td><{$item.sign_num}></td><td><{$item.tel}></td><td><{$item.addr}></td><td><{$item.template}></td>
        <td><{if $item.closed==0}><b style=" color: green;">正常</b><{else}><b style=" color: red;">已下架</b><{/if}></td>
        <td>
            <{link ctl="activity/ex" arg0=$item.id title="活动内容补充" class="button"}>             
            <{link ctl="activity/main:edit" args=$item.id title="修改" class="button"}>
             <{if $item.closed==0}>
            <{link ctl="activity/main:delete" args=$item.id act="mini:下架" confirm="mini:确定要下架吗？" title="下架" class="button"}>
            <{else}>
             <{link ctl="activity/main:renew" args=$item.id act="mini:上架" confirm="mini:确定要上架吗？" title="上架" class="button"}>
            <{/if}>
            <{link ctl="activity/sign:activity" args=$item.id title="报名管理" class="button"}>
        </td>
    </tr>
    <{foreachelse}>
     <tr><td colspan="20"><p class="text-align tip-notice">没有数据</p></td></tr>
    <{/foreach}>
    </table>
	</form>
	<div class="page-bar">
		<table>
			<tr>
			<td class="w-100"></td>
			<td colspan="10" class="left"></td>
			<td class="page-list"><{$pager.pagebar}></td>
		</tr>
                </table>
	</div>
</div>
<{include file="admin:common/footer.html"}>